Aspects of the disclosure relate to automatic exposure control. For an image sensor to produce a useable signal, the sensor must adjust its gains and exposure parameters such that output signals lie within the dynamic range of the sensor. Overexposure leads to over-saturated pixels at the high end of the dynamic range. FIG. 1A illustrates an example of an over-exposed image. FIG. 1B is a luminance histogram associated with the over-exposed image shown in FIG. 1A. By contrast, underexposure leads to under-saturated pixels at the low end of the dynamic range. FIG. 2A illustrates an example of an under-exposure image. FIG. 2B is a luminance histogram associated with the under-exposure image shown in FIG. 2A. In both the over-exposed and under-exposure cases, the resultant image's dynamic range is reduced. Therefore, in order to consistently produce images with the widest dynamic range, it is desirable for a sensor to have a control system that automatically adjusts its exposure settings such that both over- or under-exposures are avoided. This control algorithm is commonly referred to as the Automatic Exposure Control, or AEC. Existing AEC techniques mainly rely on balancing of the pixel brightness distribution of an image. Without more, existing AEC technique have significant limitations.